<!doctype html><html xmlns="http://www.w3.org/1999/xhtml" id="html">
    <head>
        <title></title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <base href="<?= base_url(1); ?>" />
        <link type="text/css" href="css/main.css?v=<?= $config['version'] ?>" rel="stylesheet" />
    </head>
    <body>
        <?php include(VIEWPATH . 'common/main_header.php'); ?>
        <div class="datalist"><table id="flexigrid" style="display:none"></table></div>
        <script type="text/javascript">
            $(function() {
                $("#flexigrid").flexigrid($.extend(SG.flexOptions, {
                    url: '<?= site_url('mail/sendlog/flexigrid') ?>',
                    colModel: [
						{display: '<?= translate('MAIL_INSERT_TIME') ?>', name: 'insert_time', width: 120},
						{display: '<?= translate('MAIL_ISSUCCESS') ?>', name: 'issuccess', width: 100,},
						
						{display: '<?= translate('AREANAME') ?>', name: 'areanum', width: 120, process: formatSearch},
						{display: '<?= translate('MAIL_ROLENAME') ?>', name: 'reciver_name', width: 100, process: formatSearch},
						{display: '<?= translate('MAIL_ROLEID') ?>', name: 'receiver_id', width: 100},
						
						
						{display: '<?= translate('MAIL_OBJECTID1') ?>', name: 'item0', width: 200},
						{display: '<?= translate('MAIL_OBJECTNUM1') ?>', name: 'amount0', width: 80},
						{display: '<?= translate('MAIL_EQUIPLV1') ?>', name: 'equiplv0', width: 80},
						
						{display: '<?= translate('MAIL_OBJECTID2') ?>', name: 'item1', width: 200},
						{display: '<?= translate('MAIL_OBJECTNUM2') ?>', name: 'amount1', width: 80},
						{display: '<?= translate('MAIL_EQUIPLV2') ?>', name: 'equiplv1', width: 80},
						
						{display: '<?= translate('MAIL_OBJECTID3') ?>', name: 'item2', width: 200},
						{display: '<?= translate('MAIL_OBJECTNUM3') ?>', name: 'amount2', width: 80},
						{display: '<?= translate('MAIL_EQUIPLV3') ?>', name: 'equiplv2', width: 80},
						
						{display: '<?= translate('MAIL_OBJECTID4') ?>', name: 'item3', width: 200},
						{display: '<?= translate('MAIL_OBJECTNUM4') ?>', name: 'amount3', width: 80},
						{display: '<?= translate('MAIL_EQUIPLV4') ?>', name: 'equiplv3', width: 80},

						{display: '<?= translate('MAIL_TITLE') ?>', name: 'mail_title', width: 200, process: formatSearch},
						{display: '<?= translate('MAIL_TIME_LIMIT') ?>', name: 'keep_time', width: 100},
						{display: '<?= translate('MAIL_CONTENT') ?>', name: 'mail_content', width: 350, process: formatSearch},
						
						{display: '<?= translate('MANAGE') ?>', name: 'id', width: 100, sortable: false, process: formatOp}
                    ],
                    buttons: [						
						{ name: 'add', displayname: "<?=translate('SEND')?>", title: "<?=translate('SEND')?>", bclass: 'add', onpress: multi },
                        {name: 'export', displayname: "<?= translate('EXPORT') ?>", bclass: 'export', onpress: multi},
                        {name: 'delete', displayname: "<?= translate('DEL') ?>", title: "<?= translate('DEL') ?>", bclass: 'delete', onpress: multi},                        
                        
                        {separator: true}
                    ],
                    searchitems: true,
                }));
                SG.admin = $.extend(SG.admin, {
                	edit_url: '<?= site_url("mail/sendlog/edit/") ?>',
                	add_url: '<?= site_url("mail/sendlog/add/") ?>',
                    del_url: '<?= site_url("mail/sendlog/del/") ?>',
                    multi_url: '<?= site_url("mail/sendlog/multi/") ?>'
                });
            });
        </script>
    </body>
</html>